package com.gcit.seniorWish.web.common.persistence.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
* 操作日志
*
* @author gaozhichang
* @date 2018-03-13 下午 1:26
*/
@TableName("system_operation_log")
public class OperationLog extends Model<OperationLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.UUID)
	private String id;
    /**
     * 日志类型
     */
	private String logType;
    /**
     * 日志名称
     */
	private String logName;
    /**
     * 用户id
     */
	private String userId;
    /**
     * 类名称
     */
	private String className;
    /**
     * 方法名称
     */
	private String method;
    /**
     * 创建时间
     */
    @TableField(fill= FieldFill.INSERT)
	private Date createTime;
    /**
     * 是否成功
     */
	private String succeed;
    /**
     * 日志信息
     */
	private String message;


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLogType() {
		return logType;
	}

	public void setLogType(String logType) {
		this.logType = logType;
	}

	public String getLogName() {
		return logName;
	}

	public void setLogName(String logName) {
		this.logName = logName;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getSucceed() {
		return succeed;
	}

	public void setSucceed(String succeed) {
		this.succeed = succeed;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "OperationLog{" +
				"id='" + id + '\'' +
				", logType='" + logType + '\'' +
				", logName='" + logName + '\'' +
				", userId='" + userId + '\'' +
				", className='" + className + '\'' +
				", method='" + method + '\'' +
				", createTime=" + createTime +
				", succeed='" + succeed + '\'' +
				", message='" + message + '\'' +
				'}';
	}
}
